﻿
--Syntax Error: Incorrect syntax near Status.
--CREATE UNIQUE INDEX I_Users_UserInfo ON dbo.Users(Email)
--INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)



GO

--Syntax Error: Incorrect syntax near Status.
--CREATE UNIQUE INDEX I_Users_UserInfo ON dbo.Users(Email)
--INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)



GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO


/* 
 * INDEX: I_Users_UserInfo 
 */

CREATE UNIQUE INDEX I_Users_UserInfo ON Users(Email)
INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)

GO

--Syntax Error: Incorrect syntax near Status.
--
--/* 
-- * INDEX: I_Users_UserInfo 
-- */
--
--CREATE UNIQUE INDEX I_Users_UserInfo ON Users(Email)
--INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)



GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO


/* 
 * INDEX: I_Users_UserInfo 
 */

CREATE UNIQUE INDEX I_Users_UserInfo ON Users(Email)
INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)

GO

--Syntax Error: Incorrect syntax near Status.
--
--/* 
-- * INDEX: I_Users_UserInfo 
-- */
--
--CREATE UNIQUE INDEX I_Users_UserInfo ON Users(Email)
--INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)



GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO


/* 
 * INDEX: I_Users_UserInfo 
 */

CREATE UNIQUE INDEX I_Users_UserInfo ON Users(Email)
INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)

GO

--Syntax Error: Incorrect syntax near Status.
--
--/* 
-- * INDEX: I_Users_UserInfo 
-- */
--
--CREATE UNIQUE INDEX I_Users_UserInfo ON Users(Email)
--INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)



GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO


/* 
 * INDEX: I_Users_UserInfo 
 */

CREATE UNIQUE INDEX I_Users_UserInfo ON Users(Email)
INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)

GO

--Syntax Error: Incorrect syntax near Status.
--
--/* 
-- * INDEX: I_Users_UserInfo 
-- */
--
--CREATE UNIQUE INDEX I_Users_UserInfo ON Users(Email)
--INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)



GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO


/* 
 * INDEX: I_Users_UserInfo 
 */

CREATE UNIQUE INDEX I_Users_UserInfo ON Users(Email)
INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)

GO

--Syntax Error: Incorrect syntax near Status.
--
--/* 
-- * INDEX: I_Users_UserInfo 
-- */
--
--CREATE UNIQUE INDEX I_Users_UserInfo ON Users(Email)
--INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)



GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO


/* 
 * INDEX: I_Users_UserInfo 
 */

CREATE UNIQUE INDEX I_Users_UserInfo ON Users(Email)
INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)

GO

--Syntax Error: Incorrect syntax near Status.
--
--/* 
-- * INDEX: I_Users_UserInfo 
-- */
--
--CREATE UNIQUE INDEX I_Users_UserInfo ON Users(Email)
--INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)



GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO


/* 
 * INDEX: I_Users_UserInfo 
 */

CREATE UNIQUE INDEX I_Users_UserInfo ON Users(Email)
INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)

GO

--Syntax Error: Incorrect syntax near Status.
--
--/* 
-- * INDEX: I_Users_UserInfo 
-- */
--
--CREATE UNIQUE INDEX I_Users_UserInfo ON Users(Email)
--INCLUDE (Password, Salt, RegistrationDate, FirstName, LastName Status, Type)



GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Favorites') IS NOT NULL
    PRINT '<<< CREATED TABLE Favorites >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Favorites >>>'
GO

IF OBJECT_ID('Ratings') IS NOT NULL
    PRINT '<<< CREATED TABLE Ratings >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Ratings >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Favorites') IS NOT NULL
    PRINT '<<< CREATED TABLE Favorites >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Favorites >>>'
GO

IF OBJECT_ID('Ratings') IS NOT NULL
    PRINT '<<< CREATED TABLE Ratings >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Ratings >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('_ChangesTracker') IS NOT NULL
    PRINT '<<< CREATED TABLE _ChangesTracker >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE _ChangesTracker >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Favorites') IS NOT NULL
    PRINT '<<< CREATED TABLE Favorites >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Favorites >>>'
GO

IF OBJECT_ID('Ratings') IS NOT NULL
    PRINT '<<< CREATED TABLE Ratings >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Ratings >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO
<<<<<<< .mine

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Comments') IS NOT NULL
    PRINT '<<< CREATED TABLE Comments >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Comments >>>'
GO

IF OBJECT_ID('Favorites') IS NOT NULL
    PRINT '<<< CREATED TABLE Favorites >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Favorites >>>'
GO

IF OBJECT_ID('Friends') IS NOT NULL
    PRINT '<<< CREATED TABLE Friends >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Friends >>>'
GO

IF OBJECT_ID('Message') IS NOT NULL
    PRINT '<<< CREATED TABLE Message >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Message >>>'
GO

IF OBJECT_ID('Ratings') IS NOT NULL
    PRINT '<<< CREATED TABLE Ratings >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Ratings >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Comments') IS NOT NULL
    PRINT '<<< CREATED TABLE Comments >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Comments >>>'
GO

IF OBJECT_ID('Favorites') IS NOT NULL
    PRINT '<<< CREATED TABLE Favorites >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Favorites >>>'
GO

IF OBJECT_ID('Friends') IS NOT NULL
    PRINT '<<< CREATED TABLE Friends >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Friends >>>'
GO

IF OBJECT_ID('Messages') IS NOT NULL
    PRINT '<<< CREATED TABLE Messages >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Messages >>>'
GO

IF OBJECT_ID('Ratings') IS NOT NULL
    PRINT '<<< CREATED TABLE Ratings >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Ratings >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Comments') IS NOT NULL
    PRINT '<<< CREATED TABLE Comments >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Comments >>>'
GO

IF OBJECT_ID('Favorites') IS NOT NULL
    PRINT '<<< CREATED TABLE Favorites >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Favorites >>>'
GO

IF OBJECT_ID('Friends') IS NOT NULL
    PRINT '<<< CREATED TABLE Friends >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Friends >>>'
GO

IF OBJECT_ID('Messages') IS NOT NULL
    PRINT '<<< CREATED TABLE Messages >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Messages >>>'
GO

IF OBJECT_ID('Ratings') IS NOT NULL
    PRINT '<<< CREATED TABLE Ratings >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Ratings >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Comments') IS NOT NULL
    PRINT '<<< CREATED TABLE Comments >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Comments >>>'
GO

IF OBJECT_ID('Favorites') IS NOT NULL
    PRINT '<<< CREATED TABLE Favorites >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Favorites >>>'
GO

IF OBJECT_ID('Friends') IS NOT NULL
    PRINT '<<< CREATED TABLE Friends >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Friends >>>'
GO

IF OBJECT_ID('Messages') IS NOT NULL
    PRINT '<<< CREATED TABLE Messages >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Messages >>>'
GO

IF OBJECT_ID('Ratings') IS NOT NULL
    PRINT '<<< CREATED TABLE Ratings >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Ratings >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Comments') IS NOT NULL
    PRINT '<<< CREATED TABLE Comments >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Comments >>>'
GO

IF OBJECT_ID('Favorites') IS NOT NULL
    PRINT '<<< CREATED TABLE Favorites >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Favorites >>>'
GO

IF OBJECT_ID('Friends') IS NOT NULL
    PRINT '<<< CREATED TABLE Friends >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Friends >>>'
GO

IF OBJECT_ID('Messages') IS NOT NULL
    PRINT '<<< CREATED TABLE Messages >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Messages >>>'
GO

IF OBJECT_ID('Ratings') IS NOT NULL
    PRINT '<<< CREATED TABLE Ratings >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Ratings >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Comments') IS NOT NULL
    PRINT '<<< CREATED TABLE Comments >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Comments >>>'
GO

IF OBJECT_ID('Favorites') IS NOT NULL
    PRINT '<<< CREATED TABLE Favorites >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Favorites >>>'
GO

IF OBJECT_ID('Friends') IS NOT NULL
    PRINT '<<< CREATED TABLE Friends >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Friends >>>'
GO

IF OBJECT_ID('Messages') IS NOT NULL
    PRINT '<<< CREATED TABLE Messages >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Messages >>>'
GO

IF OBJECT_ID('Ratings') IS NOT NULL
    PRINT '<<< CREATED TABLE Ratings >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Ratings >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO
=======

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('dbo.Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Administrators >>>'
GO

IF OBJECT_ID('dbo.Books') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Books >>>'
GO

IF OBJECT_ID('dbo.BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.BooksByAuthor >>>'
GO

IF OBJECT_ID('dbo.BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.BooksByCategory >>>'
GO

IF OBJECT_ID('dbo.Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Categories >>>'
GO

IF OBJECT_ID('dbo.Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Responses >>>'
GO

IF OBJECT_ID('dbo.Favorites') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Favorites >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Favorites >>>'
GO

IF OBJECT_ID('dbo.Ratings') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Ratings >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Ratings >>>'
GO

IF OBJECT_ID('dbo.Users') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('dbo.Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX dbo.Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX dbo.Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('dbo.Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Administrators >>>'
GO

IF OBJECT_ID('dbo.Books') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Books >>>'
GO

IF OBJECT_ID('dbo.BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.BooksByAuthor >>>'
GO

IF OBJECT_ID('dbo.BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.BooksByCategory >>>'
GO

IF OBJECT_ID('dbo.Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Categories >>>'
GO

IF OBJECT_ID('dbo.Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Responses >>>'
GO

IF OBJECT_ID('dbo.Favorites') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Favorites >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Favorites >>>'
GO

IF OBJECT_ID('dbo.Ratings') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Ratings >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Ratings >>>'
GO

IF OBJECT_ID('dbo.Users') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('dbo.Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX dbo.Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX dbo.Users.I_Users_UserInfo >>>'
GO
>>>>>>> .r253

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('dbo.Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Administrators >>>'
GO

IF OBJECT_ID('dbo.Books') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Books >>>'
GO

IF OBJECT_ID('dbo.BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.BooksByAuthor >>>'
GO

IF OBJECT_ID('dbo.BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.BooksByCategory >>>'
GO

IF OBJECT_ID('dbo.Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Categories >>>'
GO

IF OBJECT_ID('dbo.Comments') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Comments >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Comments >>>'
GO

IF OBJECT_ID('dbo.Favorites') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Favorites >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Favorites >>>'
GO

IF OBJECT_ID('dbo.Friends') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Friends >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Friends >>>'
GO

IF OBJECT_ID('dbo.Ratings') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Ratings >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Ratings >>>'
GO

IF OBJECT_ID('dbo.Users') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.Users >>>'
GO

IF OBJECT_ID('Messages') IS NOT NULL
    PRINT '<<< CREATED TABLE Messages >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Messages >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('dbo.Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX dbo.Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX dbo.Users.I_Users_UserInfo >>>'
GO

IF OBJECT_ID('Administrators') IS NOT NULL
    PRINT '<<< CREATED TABLE Administrators >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Administrators >>>'
GO

IF OBJECT_ID('Authors') IS NOT NULL
    PRINT '<<< CREATED TABLE Authors >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Authors >>>'
GO

IF OBJECT_ID('Books') IS NOT NULL
    PRINT '<<< CREATED TABLE Books >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Books >>>'
GO

IF OBJECT_ID('BooksByAuthor') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByAuthor >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByAuthor >>>'
GO

IF OBJECT_ID('BooksByCategory') IS NOT NULL
    PRINT '<<< CREATED TABLE BooksByCategory >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE BooksByCategory >>>'
GO

IF OBJECT_ID('Categories') IS NOT NULL
    PRINT '<<< CREATED TABLE Categories >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Categories >>>'
GO

IF OBJECT_ID('Comments') IS NOT NULL
    PRINT '<<< CREATED TABLE Comments >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Comments >>>'
GO

IF OBJECT_ID('Favorites') IS NOT NULL
    PRINT '<<< CREATED TABLE Favorites >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Favorites >>>'
GO

IF OBJECT_ID('Friends') IS NOT NULL
    PRINT '<<< CREATED TABLE Friends >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Friends >>>'
GO

IF OBJECT_ID('Messages') IS NOT NULL
    PRINT '<<< CREATED TABLE Messages >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Messages >>>'
GO

IF OBJECT_ID('Ratings') IS NOT NULL
    PRINT '<<< CREATED TABLE Ratings >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Ratings >>>'
GO

IF OBJECT_ID('Responses') IS NOT NULL
    PRINT '<<< CREATED TABLE Responses >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Responses >>>'
GO

IF OBJECT_ID('Users') IS NOT NULL
    PRINT '<<< CREATED TABLE Users >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE Users >>>'
GO

IF EXISTS (SELECT * FROM sys.indexes WHERE object_id=OBJECT_ID('Users') AND name='I_Users_UserInfo')
    PRINT '<<< CREATED INDEX Users.I_Users_UserInfo >>>'
ELSE
    PRINT '<<< FAILED CREATING INDEX Users.I_Users_UserInfo >>>'
GO
